﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EmotionRecognitionMessages;

namespace EmotionRecognitionGui
{
    public partial class Registeration : BasicForm
    {
        GuiManager guiManager;//
        public Registeration()
        {
            try
            {
                guiManager = GuiManager.Instance;
                InitializeComponent();
            
            }
            catch (Exception e)
            {
                MessageBox.Show("Error: " + e.ToString());
            }
        }

        protected void label3_Click(object sender, EventArgs e)
        {

        }


        protected void okButton_Click(object sender, EventArgs e)
        { 
            //create new registerMsg
            Messages registermsg = new Messages();
            bool role;
             if (reviwerRadioButton.Checked)
                 role = false;  
             else
                 role = true;

             registermsg.RegisterUser(passwordTextbox.Text, userNameTextBox.Text, role);


        }
        private void buttonBack_Click_1(object sender, EventArgs e)
        {
            guiManager.SwitchForms(this, guiManager.userLoginGui);
        }

    }
}
